--- import { render } from "astro:content"; import type { GetStaticPaths, InferGetStaticPropsType } from "astro"; import { getAllPosts, getPostNavigation } from "@/data/post"; import PostLayout from "@/layouts/BlogPost.astro"; // if you're using an adaptor in SSR mode, getStaticPaths wont work -> https://docs.astro.build/en/guides/routing/#modifying-the-slug-example-for-ssr export const getStaticPaths = (async () => { const blogEntries = await getAllPosts(true); // Include archived posts for direct access return blogEntries.map((post) => { const { prevPost, nextPost } = getPostNavigation(blogEntries, post); return { params: { slug: post.id }, props: { post, prevPost, nextPost }, }; }); }) satisfies GetStaticPaths; type Props = InferGetStaticPropsType; const { post, prevPost, nextPost } = Astro.props; const { Content } = await render(post); ---